3.12 \(\int x (a+b \sec (c+d x^2))^2 \, dx\)

Optimal. Leaf size=44 \[ \frac {a^2 x^2}{2}+\frac {a b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tan \left (c+d x^2\right )}{2 d} \]

[Out]

1/2*a^2*x^2+a*b*arctanh(sin(d*x^2+c))/d+1/2*b^2*tan(d*x^2+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4204, 3773, 3770, 3767, 8} \[ \frac {a^2 x^2}{2}+\frac {a b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tan \left (c+d x^2\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Sec[c + d*x^2])^2,x]

[Out]

(a^2*x^2)/2 + (a*b*ArcTanh[Sin[c + d*x^2]])/d + (b^2*Tan[c + d*x^2])/(2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3773

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[a^2*x, x] + (Dist[2*a*b, Int[Csc[c + d*x], x],
 x] + Dist[b^2, Int[Csc[c + d*x]^2, x], x]) /; FreeQ[{a, b, c, d}, x]

Rule 4204

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int x \left (a+b \sec \left (c+d x^2\right )\right )^2 \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int (a+b \sec (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac {a^2 x^2}{2}+(a b) \operatorname {Subst}\left (\int \sec (c+d x) \, dx,x,x^2\right )+\frac {1}{2} b^2 \operatorname {Subst}\left (\int \sec ^2(c+d x) \, dx,x,x^2\right )\\ &=\frac {a^2 x^2}{2}+\frac {a b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{d}-\frac {b^2 \operatorname {Subst}\left (\int 1 \, dx,x,-\tan \left (c+d x^2\right )\right )}{2 d}\\ &=\frac {a^2 x^2}{2}+\frac {a b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )}{d}+\frac {b^2 \tan \left (c+d x^2\right )}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 41, normalized size = 0.93 \[ \frac {a^2 d x^2+2 a b \tanh ^{-1}\left (\sin \left (c+d x^2\right )\right )+b^2 \tan \left (c+d x^2\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Sec[c + d*x^2])^2,x]

[Out]

(a^2*d*x^2 + 2*a*b*ArcTanh[Sin[c + d*x^2]] + b^2*Tan[c + d*x^2])/(2*d)

________________________________________________________________________________________

fricas [B]  time = 0.66, size = 91, normalized size = 2.07 \[ \frac {a^{2} d x^{2} \cos \left (d x^{2} + c\right ) + a b \cos \left (d x^{2} + c\right ) \log \left (\sin \left (d x^{2} + c\right ) + 1\right ) - a b \cos \left (d x^{2} + c\right ) \log \left (-\sin \left (d x^{2} + c\right ) + 1\right ) + b^{2} \sin \left (d x^{2} + c\right )}{2 \, d \cos \left (d x^{2} + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x^2+c))^2,x, algorithm="fricas")

[Out]

1/2*(a^2*d*x^2*cos(d*x^2 + c) + a*b*cos(d*x^2 + c)*log(sin(d*x^2 + c) + 1) - a*b*cos(d*x^2 + c)*log(-sin(d*x^2
 + c) + 1) + b^2*sin(d*x^2 + c))/(d*cos(d*x^2 + c))

________________________________________________________________________________________

giac [B]  time = 0.86, size = 88, normalized size = 2.00 \[ \frac {{\left (d x^{2} + c\right )} a^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, b^{2} \tan \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right )^{2} - 1}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x^2+c))^2,x, algorithm="giac")

[Out]

1/2*((d*x^2 + c)*a^2 + 2*a*b*log(abs(tan(1/2*d*x^2 + 1/2*c) + 1)) - 2*a*b*log(abs(tan(1/2*d*x^2 + 1/2*c) - 1))
 - 2*b^2*tan(1/2*d*x^2 + 1/2*c)/(tan(1/2*d*x^2 + 1/2*c)^2 - 1))/d

________________________________________________________________________________________

maple [A]  time = 0.52, size = 59, normalized size = 1.34 \[ \frac {a^{2} x^{2}}{2}+\frac {b^{2} \tan \left (d \,x^{2}+c \right )}{2 d}+\frac {a b \ln \left (\sec \left (d \,x^{2}+c \right )+\tan \left (d \,x^{2}+c \right )\right )}{d}+\frac {a^{2} c}{2 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*sec(d*x^2+c))^2,x)

[Out]

1/2*a^2*x^2+1/2*b^2*tan(d*x^2+c)/d+1/d*a*b*ln(sec(d*x^2+c)+tan(d*x^2+c))+1/2/d*a^2*c

________________________________________________________________________________________

maxima [B]  time = 0.82, size = 96, normalized size = 2.18 \[ \frac {1}{2} \, a^{2} x^{2} + \frac {a b \log \left (\sec \left (d x^{2} + c\right ) + \tan \left (d x^{2} + c\right )\right )}{d} + \frac {b^{2} \sin \left (2 \, d x^{2} + 2 \, c\right )}{d \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + d \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + 2 \, d \cos \left (2 \, d x^{2} + 2 \, c\right ) + d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x^2+c))^2,x, algorithm="maxima")

[Out]

1/2*a^2*x^2 + a*b*log(sec(d*x^2 + c) + tan(d*x^2 + c))/d + b^2*sin(2*d*x^2 + 2*c)/(d*cos(2*d*x^2 + 2*c)^2 + d*
sin(2*d*x^2 + 2*c)^2 + 2*d*cos(2*d*x^2 + 2*c) + d)

________________________________________________________________________________________

mupad [B]  time = 1.50, size = 100, normalized size = 2.27 \[ \frac {a^2\,x^2}{2}+\frac {b^2\,1{}\mathrm {i}}{d\,\left ({\mathrm {e}}^{2{}\mathrm {i}\,d\,x^2+c\,2{}\mathrm {i}}+1\right )}+\frac {a\,b\,\ln \left (-a\,b\,x\,4{}\mathrm {i}-4\,a\,b\,x\,{\mathrm {e}}^{d\,x^2\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )}{d}-\frac {a\,b\,\ln \left (a\,b\,x\,4{}\mathrm {i}-4\,a\,b\,x\,{\mathrm {e}}^{d\,x^2\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b/cos(c + d*x^2))^2,x)

[Out]

(a^2*x^2)/2 + (b^2*1i)/(d*(exp(c*2i + d*x^2*2i) + 1)) + (a*b*log(- a*b*x*4i - 4*a*b*x*exp(d*x^2*1i)*exp(c*1i))
)/d - (a*b*log(a*b*x*4i - 4*a*b*x*exp(d*x^2*1i)*exp(c*1i)))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \left (a + b \sec {\left (c + d x^{2} \right )}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sec(d*x**2+c))**2,x)

[Out]

Integral(x*(a + b*sec(c + d*x**2))**2, x)

________________________________________________________________________________________